Skip to content

Conversation

@sgindeed
Copy link

@sgindeed sgindeed commented Oct 8, 2025

Description of Change

Added an implementation of IntroSort (Introspective Sort) in C.
IntroSort is a hybrid sorting algorithm that begins with QuickSort, switches to HeapSort when the recursion depth exceeds a limit, and uses InsertionSort for small subarrays.
This approach achieves both fast average performance and optimal worst-case behavior — the same principle used by std::sort in C++.

References

Implements #1488

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Added a practical, high-performance hybrid sorting algorithm combining QuickSort, HeapSort, and InsertionSort for balanced performance and guaranteed O(n log n) complexity in the worst case.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant